import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";
import { PageDto } from "src/common/dto/dto";
import { FindOperator } from "typeorm";

/*
 * @Description: 
 * @Author: fhw
 * @Date: 2023-03-06 15:12:16
 */
export class GetFeedbackPageDot extends PageDto {
    /** 反馈内容 */
    @ApiPropertyOptional({
        type: String,
        name: 'content',
        description: '反馈内容',
    })
    public readonly content: FindOperator<string>;
    /** 电话号码 */
    @ApiPropertyOptional({
        type: String,
        name: 'phone',
        description: '电话号码',
    })
    public readonly phone: string;
    /** 用户名称 */
    @ApiPropertyOptional({
        type: Number,
        name: 'userId',
        description: 'userId',
    })
    public readonly userId: number;
}
export class CreateFeedbackDto {
    @IsNotEmpty({ message: '用户ID不能为空' })
    @ApiProperty({
        type: Number,
        name: 'userId',
        description: 'userId',
    })
    public readonly userId: number;
    @IsNotEmpty({ message: '反馈问题不能为空' })
    @ApiProperty({
        type: String,
        name: 'content',
        description: '反馈问题',
    })
    public readonly content: string;
    /** 电话号码 */
    @IsNotEmpty({ message: '电话号码不能为空' })
    @ApiProperty({
        type: String,
        name: 'phone',
        description: '电话号码',
    })
    public readonly phone: string;
    /** 反馈图片 */
    @ApiPropertyOptional({
        type: String,
        name: 'images',
        description: '反馈图片',
    })
    public readonly images: string;
}